package com.spyfool.aopofaspectj.aspect.anno;

import android.util.Log;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * 用户行为统计
 */
@Aspect
public class UserActionAspect {
    private static final String TAG = "UserActionAspect";

    @Pointcut("execution(@com.spyfool.aopofaspectj.aspect.anno.UserActionTrace * *(..))")
    public void actionHandle() {
    }

    /**
     * @param joinPoint 在Before与after状态下为空
     */
    @Before("behaviorHandle()")
    public Object weaveJoinPoint(ProceedingJoinPoint joinPoint) throws Throwable {
        Log.e(TAG, "handleBeHavior: 执行了");
        return null;
    }
}
